<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--  -->
    <title>{{ page.title }} - {{ site.title }}</title>
    <meta name="author" content="{{ site.author }}" />
    <meta name="description" content="{% if page.title %}{{ page.title }}{% else %}{{ site.description }}{% endif %}" />
    <meta name="keywords" content="{% if page.title %}{{ page.title }}, {{ site.title }}, {% for categ in page.categories %}{{ categ }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% else %}{{ site.title }}, {% for category in site.categories %}{% capture categories_slug %}{{ category | first }}{% endcapture %}{% for categ in categories_slug %}{{ categ }}{% endfor %}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}" />

    <!-- Favicon -->
    <link rel="shortcut icon" href="{{ site.baseurl }}{{ site.icon }}" />
    
    <!-- Apple Touch Icons -->
    <link rel="apple-touch-icon" href="{{ site.baseurl }}{{ site.logo }}" />

    <!-- Windows 8 Tile Icons -->
    <meta name="application-name" content="{{ site.post_author }} Blog">
    <meta name="msapplication-TileColor" content="#0562DC">
    <meta name="msapplication-square70x70logo" content="smalltile.png" />
    <meta name="msapplication-square150x150logo" content="mediumtile.png" />
    <meta name="msapplication-wide310x150logo" content="widetile.png" />
    <meta name="msapplication-square310x310logo" content="largetile.png" />
    
    <!-- Android Lolipop Theme Color -->
    <meta name="theme-color" content="{{ page.color }}">

    <!-- Meta for other sites -->
    <meta content="{{ site.share.fb_appid }}" property="fb:app_id">
    <meta content="{{ site.title }}" property="og:site_name">
    {% if page.title %}
        <meta content="{{ page.title }}" property="og:title">
    {% else %}
        <meta content="{{ site.title }}" property="og:title">
    {% endif %}
    {% if page.title %}
        <meta content="article" property="og:type">
    {% else %}
        <meta content="website" property="og:type">
    {% endif %}
    {% if page.description %}
        <meta content="{{ page.description }}" property="og:description">
    {% else %}
        <meta content="{{ site.description }}" property="og:description">
    {% endif %}
    {% if page.url %}
        <meta content="{{ site.baseurl }}{{ page.url }}" property="og:url">
    {% endif %}
    {% if page.date %}
        <meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time">
        <meta content="{{ site.baseurl }}/about/" property="article:author">
    {% endif %}
    {% if page.categories %}
        {% for category in page.categories limit:1 %}
        <meta content="{{ category }}" property="article:section">
        {% endfor %}
    {% endif %}
    {% if page.tags %}
        {% for tag in page.tags %}
        <meta content="{{ tag }}" property="article:tag">
        {% endfor %}
    {% endif %}
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@{{ site.share.twitter_username }}">
    <meta name="twitter:creator" content="@{{ site.share.twitter_username }}">
    {% if page.title %}
        <meta name="twitter:title" content="{{ page.title }}">
    {% else %}
        <meta name="twitter:title" content="{{ site.title }}">
    {% endif %}
    {% if page.url %}
        <meta name="twitter:url" content="{{ site.baseurl }}{{ page.url }}">
    {% endif %}
    {% if page.description %}
        <meta name="twitter:description" content="{{ page.description }}">
    {% else %}
        <meta name="twitter:description" content="{{ site.description }}">
    {% endif %}
    {% if page.header-img %}
        <meta name="twitter:image:src" content="{{ site.baseurl }}/{{ page.header-img }}">
    {% endif %}

    <!-- Fonts -->
    <link rel="stylesheet" href="{{ "/assets/css/main.min.css" | prepend: site.baseurl }}">
    <link rel="stylesheet" href="{{ "/assets/css/syntax.min.css" | prepend: site.baseurl }}">
    <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
    <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
</head>
